package com.ruoyi.web.controller.his;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.his.domain.HisDepartment;
import com.ruoyi.his.service.IHisDepartmentService;
import com.ruoyi.his.service.IHisRestrictedDrugService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/his/department")
public class HisDepartmentcortroller extends BaseController {
    @Autowired
    private IHisDepartmentService hisDepartmentService;

    @GetMapping("/getDeviceId/{channelId}")
    public AjaxResult getDeviceId(@PathVariable String channelId){
        String deviceId = hisDepartmentService.getDeviceId(channelId);
        return AjaxResult.success("data",deviceId);
     }

    /**
     * 获取当前医院的科室
     * @return
     */
    @GetMapping("/getDepartmentInfo")
    public List<HisDepartment> getDepartmentInfo(HisDepartment hisDepartment){
        List<HisDepartment> departments = hisDepartmentService.getDpartment(hisDepartment);
        return departments;
    }
}
